#ifndef UMEMO
#define UMEMO
#include "../stdafx.h"
#include "UControl.h"
#include "../UCallBack.h"
#include "../UGLFont.h"
#include "../UColor.h"

class TGLFont;

class TMemo: public TControl
{
private:
	TGLFontRef font;
	RGBAColor fgcol, bgcol;
	int lastclickindex;
public:
	TMemo(TRectangle rect, TGLFontRef fnt = TGLFontRef(), RGBAColor fgc = RGBAColor(1,1,1), RGBAColor bgc = RGBAColor(0,0,0));
	virtual void Draw();
	virtual void MouseDown	(int X, int Y, uint8 button);
	virtual void MouseUp	(int X, int Y, uint8 button);
	virtual void MouseClick(); //called on mouse down, mouse up without an other mouse down on an other control

	function<void (int i)> onClick;

	bool reverseoutline;

	std::vector<std::string> Lines;
};

#endif
